import request from '@/utils/request'

// 创建ERP工作中心映射
export function createErpCenterMapping(data) {
  return request({
    url: '/base/erp-center-mapping/create',
    method: 'post',
    data: data
  })
}

// 更新ERP工作中心映射
export function updateErpCenterMapping(data) {
  return request({
    url: '/base/erp-center-mapping/update',
    method: 'put',
    data: data
  })
}

// 删除ERP工作中心映射
export function deleteErpCenterMapping(id) {
  return request({
    url: '/base/erp-center-mapping/delete?id=' + id,
    method: 'delete'
  })
}

// 获得ERP工作中心映射
export function getErpCenterMapping(id) {
  return request({
    url: '/base/erp-center-mapping/get?id=' + id,
    method: 'get'
  })
}

// 获得ERP工作中心映射分页
export function getErpCenterMappingPage(query) {
  return request({
    url: '/base/erp-center-mapping/page',
    method: 'get',
    params: query
  })
}

// 导出ERP工作中心映射 Excel
export function exportErpCenterMappingExcel(query) {
  return request({
    url: '/base/erp-center-mapping/export-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}
